1. Field of the Invention
The present invention generally relates to non-volatile semiconductor memory devices and, more particularly, relates to non-volatile semiconductor memory devices in which stored data in a memory cell array can be erased on a block basis.
2. Description of the Background Art
Semiconductor memory devices can be divided into volatile memories such as a DRAM (Dynamic Random Access Memory) and an SRAM (Static Random Access Memory), and non-volatile memories. If power is turned off, all the stored data in a volatile memory vanishes. Conversely, stored data in a non-volatile memory does not vanish even if power is turned off.
On example of such a non-volatile semiconductor memory device is an EEPROM (Electrically Erasable and Programmable Read Only Memory) where a user can write information, electrically erase the written information and rewrite another information. A flash EEPROM is an EEPROM where stored data in all the memory cells or stored data in the memory cells in one block can be erased collectively.
FIG. 7 is a cross-sectional view showing a structure of a memory cell in a flash EEPROM.
FIG. 6 is a circuit diagram showing a structure of a memory cell array 1 and a Y gate 2. A structure and operation of a conventional flash EEPROM will now be described with reference to FIGS. 5 to 7. A low-active signal will hereinafter be indicated by a reference designation with "/" added ahead of it.
Memory cell array 1 includes a plurality of memory cells MC arranged in a matrix of rows and columns. FIG. 6 shows, as representatives nine memory cells MC arranged in a matrix of three rows x three columns sharing the same input/output line in memory cell array 1 and circuitry related to them.
A FAMOS (floating gate avalanche injection MOS) transistor is used for each memory cell MC as shown in FIG. 7, where electric charge can be stored in a floating gate. In FIG. 6, each memory cell MC is indicated by a symbolic representation of a transistor.
The FAMOS transistor includes a control gate 17, a floating gate 16, N-type regions 18 and 19 formed on a P-type substrate 15 as source/drain and an insulating layer 20.
Floating gate 16 stretches over N-type regions 18 and 19 on P-type substrate 15 with insulating layer 20 interposed therebetween.
Control gate 17 is formed over floating gate 16 with insulating layer 20 interposed therebetween.
Control gate 17 and floating gate 16 are both formed of polysilicon.
Insulating layer 20 is an oxide film such as SiO.sub.2.
The thickness of oxide film 20 between P-type substrate 15 and floating gate 16 is very small, i.e., normally in the order of 100.ANG..
The thickness of oxide film 20 between floating gate 16 and control gate 17 is normally in the order of 200.ANG., which is larger than that of the oxide film between floating gate 16 and P-type substrate 15.
As shown in FIG. 6, word lines WL1-WL3 and bit lines BL1-BL3 are provided in memory cell array 1, each word line corresponding to one of the memory rows and each bit line corresponding to one of the memory cell columns of the memory cell.
Control gates 17 of the FAMOS transistors making up each memory cell row are commonly connected to one corresponding word line. Drains 19 of the FAMOS transistors forming each memory cell column are commonly connected to one corresponding bit line. Sources 18 of the FAMOS transistors making up all the memory cells MC are commonly connected to one source line 28.
Referring to FIG. 7, in writing data, high potentials of 12 V and 6.5 V are applied to control gate 17 and drain 19 through corresponding word line and bit line while source 18 is grounded through source line 28.
The transistor is turned on by the voltage applied between control gate 17 and source 18 and a channel current flows between source 18 and drain 19. At this time, electron (hot electron).cndot.hole pairs are generated in the vicinity of drain 19 because of ionization by collision. The holes flow to the side of the grounded substrate 15. Many of the electrons flow into drain 19 at a high potential. However, as the high potential is applied to control gate 17, part of the electrons are accelerated by the electric field between floating gate 16 and drain 19 and pass through insulating film 20 between floating gate 16 and substrate 15 to be injected in floating gate 16.
Since floating gate 16 is electrically insulated from control gate 17, source 18 and drain 19 by oxide film 20, the electrons injected in floating gate 16 do not flow outward. Accordingly, the electrons which have once been injected in floating gate 16 remain stored there for a long time without flowing out even after power is turned off.
States of electrons being stored and not stored in floating gate 16 correspond to data "0" and "1", respectively. Accordingly, the stored data in memory cell MC is held even after power is turned off.
When the electrons are stored in floating gate 16, the polarity of the region between source 18 and drain 19, that is, of the channel region is shifted to be positive. Accordingly, an inversion layer is not easily generated in the channel region. Therefore, if the electrons are stored in floating gate 16, a voltage to be applied to control gate 17 necessary for causing a channel current in this transistor (that is, the threshold voltage of the transistor) becomes higher than in the case where there is no electron stored in floating gate 16. That is, the transistor is not turned on unless a higher voltage is applied to control gate 17 than in the case where no electron is stored in floating gate 16.
Referring to FIG. 7, in erasing stored data, a high potential of 12 V is applied to source 18 through source line 28 while control gate 17 is grounded through a corresponding word line. Drain 19 is brought to a floating state.
A tunnel effect is caused by the high potential applied to control gate 17 and the electrons in floating gate 16 are extracted to source 18 through oxide film 20. Accordingly, the electrons injected into floating gate 16 in data writing are removed from floating gate 16. As a result, the threshold voltage of the transistor is decreased.
In reading data, a normal power supply potential Vcc (=5 V) is applied to control gate 17 through a corresponding word line and source 18 is grounded through source line 28 in FIG. 7.
If there is no electron stored in floating gate 16, a channel current flows between source 18 and drain 19 by the power supply potential 5 V applied to control gate 17 as the threshold voltage of this transistor is low. If there are electrons stored in floating gate 16, however, since the threshold voltage of the transistor is high, the power supply potential 5 V applied to control gate 17 causes no channel current to flow between source 18 and drain 19.
Accordingly, a transistor making up a memory cell having stored data of "1" is turned on in data reading, and passes current to source line 28 from a corresponding bit line. Conversely, since a transistor constituting a memory cell having stored data of "0" is in an OFF state when in data reading, it does not pass current to source line 28 from a corresponding bit line.
Therefore, in data reading, a sense amplifier detects whether or not current flows in a bit line corresponding to a memory cell having data to be read out. If current flows in the bit line, it is determined that the stored data is "1", while if no current flows in the bit line, it is determined that the stored data is "0".
A description will now be made of specific circuit operations in writing, erasing and reading data with reference to FIG. 6.
Firstly, a circuit operation in writing data will now be described.
A X decoder 4 selectively supplies a high potential Vpp of 12 V to any one of word lines WL1-WL3 in memory cell array 1.
Y gate 2 includes an input/output line 27 connected to a write circuit 70 and a sense amplifier 80 and N channel MOS transistors 26 provided as transfer gates between input/output line 27 and bit lines BL1-BL3 in memory cell array 1, respectively. The gates of transistors 26 are connected to a Y decoder 5 through different connecting lines Y1-Y3. That is, connecting lines Y1-Y3 are provided, having one to one correspondence to bit lines BL1-BL3.
Y decoder 5 selectively supplies a potential of a high level only to any one of connecting lines Y1-Y3 in order to turn on any one of transistors 26 in Y gate 2. As a result, only one of bit lines BL1-BL3 in memory cell array 1 which corresponds to the connecting line (any one of Y1-Y3) to which the potential of the high level was supplied, is electrically connected to input/output line 27.
Write circuit 70 is activated according to data supplied from input/output buffer 9 shown in FIG. 5 to apply a high voltage Vpp to input/output line 27. Since input/output line 27 is electrically connected to one bit line (any one of BL1-BL3) only, the high voltage Vpp applied to input/output line 27 from write circuit 7 is only supplied to the one bit line.
A source line switch 3 provides a ground potential to source line 28.
In writing data, input/output buffer 9 amplifies a data signal externally supplied to input/output terminals VO0-VO7 and supplies the same to write circuit 7.
As a result of such a circuit operation, a high potential is supplied to both control gate 17 and drain 19 only in one memory cell of memory cell array 1. Accordingly, hot electrons are generated and injected in floating gate 16 only in the one memory cell. That is, data "0" is written in the one memory cell MC.
For example, if X decoder 4 applies a high voltage Vpp to word line WL1, Y decoder 5 applies a potential of a high level to connecting line Y1 and write circuit 70 is activated, data "0" is written in the memory cell MC surrounded by the dotted line in the figure.
If data supplied from input/output buffer 9 to write circuit 70 in FIG. 5 is "1", write circuit 70 is not activated. Accordingly, in such a case, one bit line (any one of BL1-BL3) corresponding to one connecting line (any one of Y1-Y3), to which the potential of high level is supplied by Y decoder 5, does not attain a high potential. Therefore, no hot electron which can be injected in floating gate 16 is generated in the one memory cell MC having drain 19 and control gate 17 connected to the one bit line and one word line (any one of WL1-WL3) to which the high voltage Vpp is applied by X decoder 4, respectively. Accordingly, the stored data in the memory cell MC remains "1".
As described above, in writing data, X decoder 4 and Y decoder 5 select one word line and one bit line, respectively, and write circuit 70 supplies a high potential to the selected bit line according to data from input/output buffer 9, so that external data is written in one memory cell MC.
A description will now be made of a circuit operation in erasing data.
X decoder 4 is deactivated and all the word lines WL1-WL3 in memory cell array 1 attain a ground potential Vss. The control gates 17 of the all the memory cells MC thereby attain the ground potential.
Similarly, Y decoder 5 is also deactivated, so that connecting lines Y1-Y3 connected to all the transistors 26 in Y gate 2 attain a potential of a low level. As a result, all the transistors 26 in Y gate 2 are turned off, so that drains 19 of all the memory cells MC are brought to the floating state.
Source line switch 3 provides a high voltage Vpp to source line 28.
Such a circuit operation described above generates high electric fields between floating gates 16 and sources 18 with sources 18 being at a higher potential so that the tunnel effect is caused, in all the memory cells MC. Therefore, the electrons flow out from floating gates 16 in all the memory cells MC. That is, the stored data in the all the memory cells MC within memory cell array 1 is erased collectively.
A circuit operation in reading data will now be described.
X decoder 4 brings the potential of only one of word lines WL1-WL3 in memory cell array 1 to a high level and the potentials of other word lines to a low level. As a result, 5 V is applied to control gate 17 of every memory cell connected to the one word line.
Y decoder 5 supplies a potential of a high level only to the gate of one of transistors 26 in Y gate 2. As a result, only one bit line (any one of BL1-BL3) connected to the one transistor 26 is electrically connected to sense amplifier 8 through input/output line 27.
Source line switch 3 grounds source line 28 in the same way as in writing data.
According to such a circuit operation described above, sense amplifier 80 reads out data in one memory cell MC having drain 19 and control gate 17 connected to the one transistor 26 which is turned on by Y decoder 5 and the one word line to which the potential of the high level is supplied by X decoder 4, respectively.
Suppose a case where a potential of a high level is supplied to connecting line Y1 and word line WL1. In such a case, whether or not current flows in bit line BL1 electrically connected to input/output line 27 depends on stored data in memory cell MC surrounded by the dotted line in the figure.
That is, since the threshold voltage of a memory cell having stored data "1" is higher than the potential Vss of the low level, memory cells having their control gates connected to word lines WL2 and WL3 at the potential of the low level are in the OFF state regardless of their stored data. Conversely, the potential Vcc of the high level is higher than the threshold voltage of a memory cell having stored data of "1" and lower than the threshold voltage of a memory cell having stored data of "0". Accordingly, the stored data of the memory cell determines whether the memory cell having the control gate connected to word line WL1 at the potential of a high level is in an ON or OFF state.
Therefore, if the stored data of memory cell MC surrounded by the dotted line in the figure is "0", memory cell MC is in the OFF state, so that no current flows from input/output line 27 to source line 28 through transistor 26 having its gate connected to connecting line Y1, bit line BL1 and the memory cell MC. If the stored data of the memory cell MC is "1", the memory cell MC is in the ON state, so that current flows from input/output line 27 to source line 28 through transistor 26 having its gate connected to connecting line Y1, bit line BL1 and the memory cell MC.
If current flows from the bit line electrically connected to input/output line 27 to source line 28, the potential on input/output line 27 is decreased, while if no current flows from the bit line electrically connected to input/output line 27 to source line 28, the potential on input/output line 27 is not decreased. Sense amplifier 80 detects whether or not current flows in the bit line electrically connected to input/output line 27 by detecting such a change of the potential on input/output line 27.
If no current flows in the bit line electrically connected to input/output line 27, sense amplifier 80 supplies a voltage signal corresponding to data "0" to input/output buffer 9 of FIG. 5. If current flows in the bit line electrically connected to input/output line 27, sense amplifier 80 applies a voltage signal corresponding to data "1" to input/output buffer 9 of FIG. 5.
In reading data, input/output buffer 9 provides the data signal supplied from sense amplifier 8 to input/output terminals VO0-VO7.
A description will now be made of an overall circuit operation of a flash EEPROM.
In FIG. 5, a control signal buffer 14 buffers each external control signal /WE, /OE, /CE and generates an internal control signal necessary for controlling other circuitry.
In the flash EEPROM, writing and erasing modes are set according to a combination of externally applied input signals. That is, a mode is set according to input data at the time of the rise of a write enable signal /WE.
In writing, firstly, a normal driving voltage Vcc and a high voltage Vpp are raised to their original values. Then, the write enable signal /WE is caused to fall. The data signal externally supplied to input/output terminals VO0-VO7 is latched in a command register 12 through input/output buffer 9, synchronizing with the rise of the write enable signal /WE. This data signal is then decoded by a command decoder 13, so that the operation mode of the flash EEPROM is set to a program mode for data writing.
Then, the write enable signal /WE is made to fall again and an externally applied address signal is latched in address register 6. Furthermore, a data signal D.sub.IN externally supplied to input/output terminals VO0-VO7 is latched in a write circuit group 7 through input/output buffer 9 in response to the rise of the write enable signal /WE.
After that, a pulse of a high voltage Vpp is generated from a program voltage generating circuit 10 and supplied to X decoder 4 and Y decoder 5. Y decoder 5 supplies this high voltage pulse to only the gate of one of the transistors 26 in Y gate 2, which is connected to one bit line provided corresponding to a memory cell column designated by the address signal latched in address register 6. X decoder 4 supplies this high voltage pulse to only one word line provided corresponding to a memory cell row designated by the address signal latched in address register 6. As a result, data latched in write circuit group 7 is written in only one memory cell MC within memory cell array 1 in the manner described above.
The write enable signal /WE is then made to fall and the data signal externally supplied to input/output terminals VO0-VO7 is latched in command register 12. Subsequently, a program verify mode is set in synchronization with the rise of the write enable signal /WE, for verifying whether or not the data has been written correctly. At this time, a verify voltage generating circuit 11 generates a voltage higher than a voltage 5 V which is supplied to a control gate of memory cell MC when data is normally read out, i.e. about 6.5 V as a so-called program verify voltage, by using a high voltage Vpp and supplies the same to X decoder 4 and Y decoder 5.
X decoder 4 supplies the program verify voltage to one word line provided corresponding to a memory cell row designated by the address signal latched in address register 6. Similarly, Y decoder 5 supplies the program verify voltage to the gate of one transistor 26 in Y gate 2, which is connected to one bit line provided corresponding to a memory cell column designated by the address signal latched in address register 6. As a result, in such a manner as described above, a sense amplifier group 8 reads out stored data in one memory cell MC connected commonly to the memory cell row and the memory cell column designated by the address signals latched in address register 6.
However, since a higher potential than in normal reading is applied to the control gate of the memory cell from which the data is to be read, even if the memory cell has data "0" written therein, the memory cell is turned on and data "1" is read out by sense amplifier group 8 when its threshold voltage does not become sufficiently high. That is, verify voltage generating circuit 11 generates such a program verify voltage in order to facilitate detection of so called poor writing where sufficient electrons are not injected into a floating gate of a memory cell in writing data of "0" and the threshold voltage of the memory cell is not shifted to be high enough.
Then, if the data read out by sense amplifier group 8 does not coincide with the data latched in write circuit 7, the above-described circuit operation is repeated and data is written again in the same memory cell as stated above. If the data read out by sense amplifier 8 coincides with the data latched in write circuit group 7, then it may be determined that the data has been written correctly, so that data writing and program verification are carried out for a memory cell in the next address. Then, when data writing and program verification are finished for all the memory cells, command decoder 13 sets the flash EEPROM to a read mode where a circuit operation for normal data reading can be performed.
In an EEPROM, data is erased by supplying a high voltage between control gate 17 and source 18 of a memory cell to force the curve of the energy band between floating gate 16 and source 18 so that the electrons tunnel from floating gate 16 to source 18 so that the election tunnel from floating gate 16 to source 18.
However, it is practically difficult to decrease the threshold voltages of all the memory cells MC to the same value even if a high voltage for erasing data is supplied to all the memory cells MC in memory cell array 1 at once.
That is, in some of the memory cells to which the high voltage is supplied collectively for erasing data, the electrons injected when writing data "0" are completely removed from floating gate 16 while in some of other memory cells, more electrons than those injected when writing data "0" are extracted from floating gate 16 and less electrons than those injected when writing data "0" are removed from the floating gate in some other memory cells.
The phenomenon where more electrons than injected by data writing are extracted from the floating gate is called "overerasing".
As described above, overerasing inverts the polarity of the threshold voltage of the memory cell to be negative, causing difficulties to subsequent data reading and writing. Therefore, a method as described below is currently used for avoiding such overerasing.
That is, a pulse width of a high voltage pulse to be applied to source line 28 for data erasing is decreased. Every time the high voltage pulse having the small pulse width is applied to source line 28, data stored in all the memory cells MC in memory cell array 1 is read out and it is verified whether or not all the data is "1". Then, if at least one memory cell which does not have stored data "1" is detected, the high voltage pulse having the small pulse width as described above is applied to source line 28 again.
Erase verification means verifying whether or not data stored in each memory cell MC is "1", that is, data stored in each memory cell has completely been erased by applying the high voltage pulse for data erasing to source line 28.
Such erase verification and application of the high voltage pulse for data erasing to source line 28 are repeated until data in all the memory cells MC within memory cell array 1 is completely erased.
A circuit operation of the entire flash EEPROM for data erasing will now be described.
Firstly, a normal power supply voltage Vcc and a high voltage Vpp rise. Subsequently, data "0" is written in all the memory cells in memory cell array 1 by repeating a circuit operation in a program mode for all the addresses in memory cell array 1.
Then, a write enable signal /WE falls and a data signal externally supplied to input/output terminals VO0-VO7 is latched in command register 12 through input/output buffer 9. This means that an erase command which is an instruction indicating erasing of the stored data in memory cell array 1 is supplied to the flash EEPROM.
Subsequently, command decoder 13 decodes the data signal indicating the erase command latched in command register 12 and sets the flash EEPROM in an erase mode for erasing the stored data in memory cell array 1.
Once the flash EEPROM is set in the erase mode, source line switch 3 supplies a high voltage Vpp to source line 28 in memory cell array 1 for a short period of time from the fall to the rise of the write enable signal /WE. As a result, in the manner as described above, the tunnel effect is caused and the electrons are extracted from the floating gate to the source in each memory cell MC of memory cell array 1.
At the rise of the write enable signal /WE when application of the high voltage Vpp to source line 28 is finished, an address signal indicating a read start address in memory cell array 1 is latched in address register 6 independently of the external address signal.
A data signal externally applied to input/output terminals VO0-VO7 is latched in command register 12 through input/output buffer 9 in response to the rise of the write enable signal /WE, as an erase verification command instructing to perform a circuit operation for verifying whether or not the stored data in memory cell array 1 has completely been erased. Command decoder 13 decodes the data signal latched in command register 12 and sets the flash EEPROM in the erase verification mode for verifying whether or not the stored data in memory cell array 1 has completely been erased.
Once the flash EEPROM is set in the erase verification mode, verification voltage generating circuit 11 generates a voltage a little lower than the voltage of 5 V to be supplied to the control gate of the memory cell in normal data reading and provides the same to X decoder 4 and Y decoder 5.
X decoder 4 supplies the little lower voltage to one word line provided corresponding to a memory cell row designated by the address signal latched in address register 6. Similarly, Y decoder 5 only supplies the little lower voltage to the gate of one connected to one bit line provided corresponding to a memory cell column designated by the address signal latched in address register 6, out of transistors 26 within Y gate 2. Accordingly, stored data in one memory cell MC designated by the address signal latched in address register 6 is read out by sense amplifier group 8 on the same principle as in the normal data reading.
However, as the potential supplied to the control gate of the memory cell from which the data is to be read out is lower than in normal data reading, the memory cell MC is never turned on and the data read out by sense amplifier group 8 never becomes data "1" unless the threshold voltage of the memory cell MC is shifted to a sufficiently low value by the data erasing stated above.
If the electrons injected into the floating gate of memory cell MC are not completely removed even by the circuit operation for the data erasing described above, the threshold voltage of the memory cell MC is not fully decreased. However, if the voltage supplied to the control gate is high in some degree, which is equal to or higher than the threshold voltage, memory cell MC is turned on in spite of insufficient data erasing. If the voltage supplied to the control gate is low, only memory cells each having the sufficiently low threshold voltage are turned on.
In order to more surely verify of whether or not store data in each memory cell MC has completely been erased, a voltage supplied to the control gate for reading out data in the erase verification mode is set lower than in the normal data reading.
If data read out by sense amplifier group 8 is "0", it can be determined that the stored data in memory cell MC designated by the address signal currently being latched in address register 6 has not completely been erased yet, so that the circuit operations for supplying a high voltage Vpp for data erasing and reading data for erase verification are repeated again.
If the data read out by sense amplifier group 8 is "1", it can be determined that the data stored in the memory cell designated by the address signal currently being latched in address register 6 has been completely erased. In this case, if the address signal latched in address register 6 does not designate the last address in memory cell array 1, the address signal latched in address register 6 is incremented and the circuit operation described above is repeated.
After these circuit operations, when the address signal latched in address register 6 designates the last address in memory cell array 1, command register 12 sets the flash EEPROM in the normal data read mode since it can be determined that the stored data in all the memory cells MC in memory cell array 1 has completely been erased.
As stated above, in the flash EEPROM of the background art, since the sources of the all the memory cells in the memory cell array are connected to the same source line to which an erase pulse is to be supplied, stored data in all the memory cells within the memory cell array is erased collectively by a single data erasing. As a result, data erasing is not carried out on a byte basis as in data writing and data reading but is performed for all the bits at the same time.
If data has already been written in the memory cell array and the data is to be rewritten into new data, the data must be erased from the memory cell array prior to writing the new data. However, because data erasing is performed collectively for all the memory cells, even if stored data in some ones of the memory cells are only desired to be rewritten, stored data in all the memory cells are erased before the data rewriting. Accordingly, it is necessary to write the same data as before erasing into memory cells of which stored data are not desired to be rewritten.
That is, even if stored data of part of only some ones of the memory cells is to be rewritten, data is newly written into all the memory cells. As a result, a longer time is required to rewrite data.
Additionally, since data of each memory cell can be rewritten only a limited number of times, it is unpreferable that an electrical stress by application of high voltage for data erasing and writing is uselessly put on the memory cells. Accordingly, in this respect as well, in rewriting data, application of an erase pulse and a write pulse to a memory cell where it is unnecessary to rewrite its stored data should be avoided.
Japanese Patent Laying-Open No. 3-76098, for example, has proposed a flash EEPROM in which data erasing can be performed on a basis of a predetermined number of memory cells. FIG. 8 is a schematic block diagram showing one example which can easily be thought of as a structure of such a flash EEPROM.
Referring to FIG. 8, in this flash EEPROM, a memory cell array 1 is divided into m blocks 1-0 to 1-(m-1). A source line decoder 20 controls a source line switch group 3 in response to an address signal from an address register 6 so that an erase pulse is applied only to any one of these blocks 1-0 to 1-(m-1) from source line switch group 3. As the structure and operation of other portions in this flash EEPROM are the same as that of the prior art shown in FIG. 5, the description thereof will not be repeated here.
A description will now be made of a structure of memory cell array 1 and its peripheral circuitry and a circuit operation of the peripheral circuitry when erasing data in this flash EEPROM, with reference to FIG. 9.
FIG. 9 shows the structure of memory cell array 1 and its peripheral circuitry supposing that there are two memory cell rows in each of the blocks 1-0 to 1-(m-1) and the number (n+1) of bits in input/output data D.sub.0 to D.sub.n is 2. FIG. 9 only shows two blocks 1-0 and 1-1 among blocks 1-0 to 1-(m-1) forming memory cell array 1 and corresponding peripheral circuits as representatives in order to simplify the figure.
A Y gate 2 includes the same number of input/output lines 52 and 53 as that of bits of input/output data D.sub.0 -D.sub.n and N channel MOS transistors 56-59 provided between each input/output line and respective memory cell array blocks 1-0 to 1-(m-1).
External terminals for receiving input/output data D.sub.0 -D.sub.n in FIG. 8 are provided one to one correspondence with all the input/output lines in Y gate 2. That is, in reading data, at each external terminal, data according to a detection result of a sense amplifier connected to a corresponding input/output line appears, and in writing data, to each external terminal, write data to be written in a memory cell connected to a corresponding input/output line is externally applied. As a result, data of a predetermined bit length is collectively written in any one of the memory cell blocks and data of a predetermined bit length is collectively read out from one memory cell array block.
That is, all the memory cells that can be electrically connected to an input/output line deal with write data and read data of the same bit.
For example, referring to FIG. 9, four memory cells 31, 32, 35 and 36 connected to transistors 56 and 58 provided corresponding to input/output line 52 and four memory cells 33, 34, 37 and 38 connected to transistors 57 and 59 provided corresponding to input/output line 53 are provided for writing and reading data D.sub.0 of the least significant bit and data D.sub.1 of the most significant bit, respectively.
A sense amplifier group 8 includes sense amplifiers 48 and 49 provided corresponding to input/output lines 52 and 53 in Y gate 2, respectively. Similarly, a write circuit group 7 includes write circuits 50 and 51 provided corresponding to input/output lines 52 and 53 in Y gate 2, respectively.
Each of memory cell array blocks 1-0 to 1-(m-1) includes the same number of bit lines 60 and 61 (62 and 63) as that of input/output lines 52 and 53. The bit lines in each memory cell array block are connected to corresponding two of transistors 56-59 in Y gate 2, respectively.
That is, one bit line 60 in memory cell array block 1-0 and one bit line 62 in memory cell array block 1-1 are connected to the same input/output line 52 through transistors 56 and 58, and another one bit line 61 in memory cell array block 1-0 and another one bit line 63 in memory cell array block 1-1 are connected to another one input/output line 53 through transistors 57 and 59, respectively.
Every two of transistors 56-59 in Y gate 2 corresponding to the same memory cell array block are collectively controlled by Y decoder 5.
That is, the gates of transistors 56 and 57 provided corresponding to memory cell array block 1-0 are connected to Y decoder 5 through the same signal line Y1 and the gates of transistors 58 and 59 provided corresponding to memory cell array block 1-1 are connected to Y decoder 5 through one signal line Y2 different from the signal line Y1.
Y decoder 5 supplies a potential of a high level only to either of signal lines Y1 and Y2 connected to the gates of transistors 56-59 in Y gate 2 when writing and reading data. Accordingly, when reading and writing data, only two of transistors 56-59 in Y gate 2, corresponding to any one of the memory cell array blocks, are turned on and electrically connect the bit lines in the one memory cell array block to input/output lines 52 and 53.
In reading data, sense amplifiers 48 and 49 operated so as to detect whether or not there is current flowing in corresponding input/output lines 52 and 53.
In writing data, each of write circuits 50 and 51 operates so as to selectively provide a high voltage Vpp to corresponding input/output line (52 or 53) according to externally applied write data. X decoder 4 also operates to control the potentials on word lines WL1 and WL2 in the same way as in the flash EEPROM shown in FIG. 5.
Word lines WL1 and WL2 are commonly provided for all the memory cell array blocks 1-0 to 1-(m-1).
Accordingly, in writing data, if a high potential Vpp is supplied to any one of the word lines, two memory cells connected to the one word line in each of memory cell array blocks 1-0 to 1-(m-1) are brought to a data writable state. However, as Y gate portion 2 controls Y decoder 5 so that bit lines in any one of the memory cell array blocks are only electrically connected to input/output lines 52 and 53, the external data is written in only those belonging to the one memory cell array block among the memory cells connected to the one word line to which the high potential Vpp is provided.
For example, if Y decoder 5 supplies a potential of a high level to signal line Y1 and X decoder 4 supplies a high potential Vpp to word line WL1, memory cells 31 and 33 in memory cell array block 1-0 are brought to the data writable state and the potentials on input/output lines 52 and 53 are transmitted to bit lines 60 and 61 through transistors 56 and 57 in an ON state. Accordingly, data is written in memory cells 31 and 33, respectively.
In reading data, X decoder 4 supplies a potential of a high level to any one of the word lines, so that all the memory cells connected to the word line in each of memory cell array blocks 1-0 to 1-(m-1) are brought to a data readable state. However, in reading out data as well, as bit lines in any one of the memory cell array blocks are only electrically connected to input/output lines 52 and 53, data is read out only from the one memory cell array block.
For example, if Y decoder 5 supplies a potential of a high level to signal line Y1 and X decoder 4 supplies a potential of a high level to word line WL1, each of the transistors 31, 33, 35 and 37 connected to word line WL1 in each of memory cell array blocks 1-0 to 1-(m-1) is turned on or off according to the stored data. However, only the bit lines 60 and 61 connected to two memory cells 31 and 33 belonging to memory cell array block 1-0 are electrically connected to input/output lines 52 and 53 through transistors 56 and 57 in the ON state. Accordingly, whether there is a current flowing in input/output lines 52 and 53 depends on the stored data in memory cells 31 and 33 in memory cell array block 1-0, respectively.
In this way, in reading data as well, data is read out only from any one of the memory cell array blocks.
Source line switch group 3 includes source line switches 43 and 44 provided corresponding to all the memory cell array blocks 1-0 to 1-(m-1), respectively.
Source lines 281 and 282 are provided individually for memory cell array blocks 1-0 to 1-(m-1). The sources of all the memory cells in each memory cell array block are connected to a corresponding source line switch through a corresponding source line.
Each of source line switches 43 and 44 is controlled by a source line decoder 20 and, in writing and reading data, operates in the same way as source line switch 3 in the flash EEPROM of FIG. 5. In erasing data, each source line switch is controlled by source line decoder 20 to selectively provide a high potential Vpp to the source line of a corresponding memory cell array block.
More specifically, if a command decoder 13 indicates the data erase mode, source line decoder 20 decodes an address signal from address register 6, and supplies a control signal for instructing either one of source line switches 43 and 44 in source line switch group 3 to generate a high potential Vpp and the other source switches not to generate such a high potential Vpp. As a result, since the high potential Vpp is generated only from one source line switch, the high potential Vpp is only supplied to the source line in the one memory cell array block provided corresponding to the one source line switch.
As X decoder 4 and Y decoder 5 operate in the same way as in the flash EEPROM of the prior art shown in FIG. 5, the control gates of all the memory cells are grounded and their drains are brought to a floating state in all the memory cell array blocks 1-0 to 1-(m-1). Therefore, data stored in all the memory cells in the one memory cell array block corresponding to the one source line switch generating the high potential Vpp is collectively erased while data stored in the memory cells within other memory cell array blocks is not erased.
For example, referring to FIG. 9, if source line decoder 20 instructs source line switch 43 to generate a high potential Vpp, source line switch 43 supplies the high potential Vpp to source line 281 while source line switch 44 does not supply the potential Vpp to the other source line 282. As a result, referring to FIG. 9, the tunnel effect is only caused between the sources and floating gates in memory cells 31 to 34 within memory cell array block 1-0 and data stored in these memory cells is erased collectively. Conversely, none of memory cells 34-38 in memory cell array block 1-1 has the source-floating gate voltage high enough to cause the tunnel effect, so that no data is erased from these memories.
An address signal, decoding of which makes it possible to specify any one of the memory cell array blocks, is supplied to source line decoder 20. For example, if data indicating which memory cell block includes a memory cell where data is to be written or read out is contained in most significant bits in data of a plurality of bits forming an externally applied address signal, those corresponding to the data of some of most significant bits among output signals of address register 6 shown in FIG. 8 may be supplied to source line decoder 20.
As stated above, according to this flash EEPROM, stored data in memory cell array 1 can be erased on a block basis. Accordingly, in rewriting the stored data in memory cell array 1, data stored in a block including a memory cell where it is necessary to change the stored data is only erased, if an external address signal is set so that no high potential Vpp may be generated from a source line switch provided corresponding to a block where it is not necessary to change stored data.
As described above, the conventional flash EEPROM where stored data can be erased on a block basis requires a source line decoder which uses an address signal as an input, in order to control a source line switch provided for each memory cell array block.
The source line decoder must decode an external address signal to supply to any one of the source line switches, a control signal for instructing to generate a high potential Vpp. Therefore, the source line decoder must include circuits provided corresponding to all the source line switches, and each adapted to generate a control signal instructing to generate a high potential Vpp in response to a specific address input only, and it is necessary to separately provide signal lines between these circuits and corresponding source line switches.
For example, referring to FIG. 9, source line decoder 20 includes a decoder 200 adapted to generate a control signal instructing to generate a high potential Vpp only when an address signal designating any of memory cells 31 to 34 in memory cell array block 1-0 is supplied as an input, and a decoder 210 adapted to generate a control signal instructing to supply a high potential Vpp only when an address signal for selecting any of memory cells 35 to 38 in memory cell array block 1-1 is supplied as an input. There are separately provided a signal line 46 for providing the output of decoder 200 to source line switch 43 and a signal line 47 for providing the output of decoder 210 to source line switch 44.
Practically, since one memory cell array is divided into a multiplicity of blocks, the same number of signal lines as that of these blocks must be provided between source line switch group 3 and source line decoder 20 and the same number of decoders as that of these signal lines must be provided in source line decoder 20.
Since each decoder in source line decoder 20 practically receives, as an input, data of a multiplicity of bits in data of a plurality of bits constituting an external address signal, it has a relatively large circuit area. Accordingly, a large area on the semiconductor substrate is occupied by source line decoder 20 and the signal lines provided between source line decoder 20 and source line switch group 3. As a result, the chip size of such a conventional flash EEPROM is increased, which goes against the general need for a reduced chip size of a semiconductor integrated circuit device.